.class LPkUwx/Axwse/EwidO/HlURX;
.super LPkUwx/Axwse/EwidO/ZVixI;


# static fields
.field private static final qxQsk:J = -0x1L


# instance fields
.field private VGUWI:Z

.field private final hhqdo:LPkUwx/WhAas;

.field private jwGjR:J

.field final synthetic rtrYB:LPkUwx/Axwse/EwidO/jGscw;


# direct methods
.method constructor <init>(LPkUwx/Axwse/EwidO/jGscw;LPkUwx/WhAas;)V
    .locals 2

    iput-object p1, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, LPkUwx/Axwse/EwidO/ZVixI;-><init>(LPkUwx/Axwse/EwidO/jGscw;LPkUwx/Axwse/EwidO/sOSTJ;)V

    const-wide/16 v0, -0x1

    iput-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    const/4 v0, 0x1

    iput-boolean v0, p0, LPkUwx/Axwse/EwidO/HlURX;->VGUWI:Z

    iput-object p2, p0, LPkUwx/Axwse/EwidO/HlURX;->hhqdo:LPkUwx/WhAas;

    return-void
.end method

.method private HcFLa()V
    .locals 6

    const-wide/16 v4, 0x0

    iget-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    const-wide/16 v2, -0x1

    cmp-long v0, v0, v2

    if-eqz v0, :cond_0

    iget-object v0, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-static {v0}, LPkUwx/Axwse/EwidO/jGscw;->HVJxM(LPkUwx/Axwse/EwidO/jGscw;)LwFZra/OeMtE;

    move-result-object v0

    invoke-interface {v0}, LwFZra/OeMtE;->GLfDF()Ljava/lang/String;

    :cond_0
    :try_start_0
    iget-object v0, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-static {v0}, LPkUwx/Axwse/EwidO/jGscw;->HVJxM(LPkUwx/Axwse/EwidO/jGscw;)LwFZra/OeMtE;

    move-result-object v0

    invoke-interface {v0}, LwFZra/OeMtE;->WDhBi()J

    move-result-wide v0

    iput-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    iget-object v0, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-static {v0}, LPkUwx/Axwse/EwidO/jGscw;->HVJxM(LPkUwx/Axwse/EwidO/jGscw;)LwFZra/OeMtE;

    move-result-object v0

    invoke-interface {v0}, LwFZra/OeMtE;->GLfDF()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iget-wide v2, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    cmp-long v1, v2, v4

    if-ltz v1, :cond_1

    invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_2

    const-string v1, ";"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    :cond_1
    new-instance v1, Ljava/net/ProtocolException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "expected chunk size and optional extensions but was \""

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-wide v4, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, "\""

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V

    throw v1
    :try_end_0
    .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception v0

    new-instance v1, Ljava/net/ProtocolException;

    invoke-virtual {v0}, Ljava/lang/NumberFormatException;->getMessage()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_2
    iget-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    cmp-long v0, v0, v4

    if-nez v0, :cond_3

    const/4 v0, 0x0

    iput-boolean v0, p0, LPkUwx/Axwse/EwidO/HlURX;->VGUWI:Z

    iget-object v0, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-static {v0}, LPkUwx/Axwse/EwidO/jGscw;->gSKjo(LPkUwx/Axwse/EwidO/jGscw;)LPkUwx/OuIib;

    move-result-object v0

    invoke-virtual {v0}, LPkUwx/OuIib;->rwFTW()LPkUwx/fZHsD;

    move-result-object v0

    iget-object v1, p0, LPkUwx/Axwse/EwidO/HlURX;->hhqdo:LPkUwx/WhAas;

    iget-object v2, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-virtual {v2}, LPkUwx/Axwse/EwidO/jGscw;->mjCBL()LPkUwx/CLKCR;

    move-result-object v2

    invoke-static {v0, v1, v2}, LPkUwx/Axwse/EwidO/bjmyg;->moVAb(LPkUwx/fZHsD;LPkUwx/WhAas;LPkUwx/CLKCR;)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, LPkUwx/Axwse/EwidO/HlURX;->JWIOI(Z)V

    :cond_3
    return-void
.end method


# virtual methods
.method public SxPEt(LwFZra/UulfZ;J)J
    .locals 6

    const-wide/16 v4, 0x0

    const-wide/16 v0, -0x1

    cmp-long v2, p2, v4

    if-gez v2, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "byteCount < 0: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iget-boolean v2, p0, LPkUwx/Axwse/EwidO/HlURX;->wwuzU:Z

    if-eqz v2, :cond_1

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "closed"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    iget-boolean v2, p0, LPkUwx/Axwse/EwidO/HlURX;->VGUWI:Z

    if-nez v2, :cond_3

    :cond_2
    :goto_0
    return-wide v0

    :cond_3
    iget-wide v2, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    cmp-long v2, v2, v4

    if-eqz v2, :cond_4

    iget-wide v2, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    cmp-long v2, v2, v0

    if-nez v2, :cond_5

    :cond_4
    invoke-direct {p0}, LPkUwx/Axwse/EwidO/HlURX;->HcFLa()V

    iget-boolean v2, p0, LPkUwx/Axwse/EwidO/HlURX;->VGUWI:Z

    if-eqz v2, :cond_2

    :cond_5
    iget-object v2, p0, LPkUwx/Axwse/EwidO/HlURX;->rtrYB:LPkUwx/Axwse/EwidO/jGscw;

    invoke-static {v2}, LPkUwx/Axwse/EwidO/jGscw;->HVJxM(LPkUwx/Axwse/EwidO/jGscw;)LwFZra/OeMtE;

    move-result-object v2

    iget-wide v4, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    invoke-static {p2, p3, v4, v5}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v4

    invoke-interface {v2, p1, v4, v5}, LwFZra/OeMtE;->SxPEt(LwFZra/UulfZ;J)J

    move-result-wide v2

    cmp-long v0, v2, v0

    if-nez v0, :cond_6

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, LPkUwx/Axwse/EwidO/HlURX;->JWIOI(Z)V

    new-instance v0, Ljava/net/ProtocolException;

    const-string v1, "unexpected end of stream"

    invoke-direct {v0, v1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_6
    iget-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    sub-long/2addr v0, v2

    iput-wide v0, p0, LPkUwx/Axwse/EwidO/HlURX;->jwGjR:J

    move-wide v0, v2

    goto :goto_0
.end method

.method public close()V
    .locals 2

    iget-boolean v0, p0, LPkUwx/Axwse/EwidO/HlURX;->wwuzU:Z

    if-eqz v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-boolean v0, p0, LPkUwx/Axwse/EwidO/HlURX;->VGUWI:Z

    if-eqz v0, :cond_1

    const/16 v0, 0x64

    sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-static {p0, v0, v1}, LPkUwx/Axwse/NmOez;->dOFGj(LwFZra/vpTWk;ILjava/util/concurrent/TimeUnit;)Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, LPkUwx/Axwse/EwidO/HlURX;->JWIOI(Z)V

    :cond_1
    const/4 v0, 0x1

    iput-boolean v0, p0, LPkUwx/Axwse/EwidO/HlURX;->wwuzU:Z

    goto :goto_0
.end method
